package top.mengchaob.deploy.jpa;

import top.mengchaob.deploy.table.HostDo;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

import javax.transaction.Transactional;
import java.util.List;

/**
 * @title：
 * @author: mengchaob
 * @date: 2021年04月28日 23:06
 * @description:
 */
public interface HostRepository  extends JpaRepository<HostDo, String> {
    @Modifying
    @Query("DELETE FROM HostDo u WHERE u.id in ?1")
    @Transactional
    int deleteByIds(List<String> ids);

}
